1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
use super::*;
use thiserror::Error;
#[derive(Debug, Copy, Clone, PartialEq, Eq, Error)]
pub enum Error {
#[error("Attempted to substitute away a dependency on a variable")]
HasDependency,
#[error("Expected an annotation")]
ExpectedAnnot,
#[error("An inconsistent type-check flag")]
InconsistentTyck,
#[error("An annotation mismatch on variable")]
VarAnnotMismatch,
#[error("General annotation mismatch")]
AnnotMismatch,
#[error("Expected a term")]
ExpectedTerm,
#[error("Expected a dependent function type")]
ExpectedPi,
#[error("Expected a type")]
ExpectedType,
#[error("Expected a universe")]
ExpectedUniverse,
#[error("Expected a function")]
ExpectedFunction,
#[error("Expected a reflexivity instance")]
ExpectedRefl,
#[error("Function took too many steps to evaluate")]
OutOfGas,
#[error("Stop the current reduction")]
StopReduction,
#[error("A type annotation is required")]
AnnotationRequired,
#[error("Parameter underflow")]
ParameterUnderflow,
#[error("Parameter overflow")]
ParameterOverflow,
#[error("Type mismatch")]
TypeMismatch,
#[error("Type unification failed")]
TypeUnificationFailure,
#[error("Subtype mismatch")]
SubtypeMismatch,
#[error("Term mismatch")]
TermMismatch,
#[error("Term unification failed")]
TermUnificationFailure,
#[error("Untyped parameter for variable")]
UntypedParameter,
#[error("Untyped parameter for variable")]
UntypedConstraint,
#[error("Cannot infer a value")]
CannotInfer,
#[error("An undefined symbol")]
UndefinedSymbol,
#[error("Not implemented")]
NotImplemented,
#[error("Universe out of bounds")]
UniverseOutOfBounds,
#[error("Attempted to coerce an untyped term")]
CoerceUntyped,
#[error("Potentially recoverable inference failure")]
InferenceFailure,
#[error("Cannot match type")]
CannotMatch,
#[error("Index out of bounds")]
IndexOutOfBounds,
}